﻿using System.Runtime.Serialization;
using System.Windows.Media.Media3D;

namespace GameBoard
{
    [DataContract]
    public class MovementCircleVisualFactory : BaseVisualFactory, IChangeLocations
    {
        public MovementCircleVisualFactory(MovementCircleVisualData d)
            : base(d)
        {
        }

        public override ModelVisual3D MakeVisual()
        {
            var v = new MovementCircleVisual();
            v.PopulateVisualData(VisualData);
            return v.VisualElement;
        }

        public void SetLocation(Point3D newLocation)
        {
            var infoD = VisualData as MovementCircleVisualData;
            infoD.Location = newLocation;
        }
    }
}